<template>
  <div>
    <el-dialog
    title="驳回原因"
    :visible.sync="dialogVisible"
    width="30%"
    :before-close="handleClose">
        <el-input type="textarea" v-model="bannedReason" placeholder="请填写驳回原因"></el-input>
        <span slot="footer" class="dialog-footer">
            <el-button @click="cancel">取 消</el-button>
            <el-button type="primary" @click="banned">确 定</el-button>
        </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'Unpass',
  props:{
    isShow:Boolean,

  },
  data() {
    return {
      dialogVisible:false,
      bannedReason:'',
    }
  },
  watch:{
    isShow:function(val){
      this.dialogVisible = val;
    }
  },
  methods:{
    cancel(){
      //清空对话框数据
      this.bannedReason = ''
      this.$emit('closeDialog')
    },
    banned(){
      this.$emit('saveBannedReason',this.bannedReason)
    },
    handleClose(){
      this.cancel()
    }
  }
  

}
</script>

<style>

</style>